﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserInfo.aspx.cs" Inherits="IceDog.DNF.Program.Website.UserInfo" %>
<%@ Import Namespace="IceDog.DNF.Program.Website" %>
<% LangHelper.ChangeLanguage(); %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>

    <form id="form1" runat="server">
        <p>本地资源文件的使用</p>
        <p>使用资源文件中的key</p>
        <asp:Panel ID="Panel1" runat="server">
            <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:name %>"></asp:Literal>
            <asp:Label ID="Label1" runat="server" Text="Black Smith"></asp:Label>
            <br />
            <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:age %>"></asp:Literal>
            <asp:Label ID="Label2" runat="server" Text="20"></asp:Label>
        </asp:Panel>
        <p>使用资源文件中的key.text</p>
        <asp:Panel ID="Panel2" runat="server">
            <asp:Literal ID="Literal3" runat="server" meta:resourcekey="name"></asp:Literal>
            <asp:Label ID="Label3" runat="server" Text="Black Smith"></asp:Label>
            <br />
            <asp:Literal ID="Literal4" runat="server" meta:resourcekey="age"></asp:Literal>
            <asp:Label ID="Label4" runat="server" Text="20"></asp:Label>
        </asp:Panel>
        <hr />
        <p>全局资源文件的使用</p>
        <%--全局资源文件的使用--%>
        <asp:Panel ID="Panel3" runat="server">
            <p>问候语(中文)：</p>
            <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:Greet_zh_cn,hello %>"></asp:Literal><br />
            <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Greet_zh_cn,hi %>"></asp:Literal><br />
            <asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:Greet_zh_cn,hey %>"></asp:Literal><br />
            <asp:Literal ID="Literal8" runat="server" Text="<%$ Resources:Greet_zh_cn,good_morning %>"></asp:Literal><br />
            <p>问候语(英文)：</p>
            <asp:Literal ID="Literal9" runat="server"  Text="<%$ Resources:Greet_en_us,hello %>"></asp:Literal><br />
            <asp:Literal ID="Literal10" runat="server" Text="<%$ Resources:Greet_en_us,hi %>"></asp:Literal><br />
            <asp:Literal ID="Literal11" runat="server" Text="<%$ Resources:Greet_en_us,hey %>"></asp:Literal><br />
            <asp:Literal ID="Literal12" runat="server" Text="<%$ Resources:Greet_en_us,good_morning %>"></asp:Literal><br />
        </asp:Panel>
        <asp:Panel ID="Panel4" runat="server">
            <p>图像</p>
            <p>
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Resources/icon1.ico"/>
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Resources/icon2.ico"/>
                <%var face1 = IconHelper.GetFace1Base64(); %>
                <img src="<%=face1 %>" alt="face1" />
            </p>
        </asp:Panel>
        <hr />
        <span>
            <% var greet = GreetHelper.GetString("hello");%>
            来自GreetHelper的问候：<%=greet %>
            <%
               string GetLabel()
               {
                   return Resources.Labels.ResourceManager.GetString("label");
               }
            %>
            <br />
            GetLabel：<%=GetLabel() %>
        </span>
        <hr />
        <div>
        </div>
    </form>
</body>
</html>
